package com.qdxwx.models.article;

import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author developer
 *
 */
public class ArticleQuery implements Serializable {

    private static final long serialVersionUID = -136855295189463473L;
	private String title;
	private int orderBy; //排序条件 0时间倒序 1浏览量倒序
	private int count;//查询数据量 0不限制	大于0限制
	
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private LocalDateTime beginCreateTime;//查询 开始添加时间
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private LocalDateTime endCreateTime;//查询 结束添加时间

    public ArticleQuery() {
    }

    public String getTitle() {
        return this.title;
    }

    public int getOrderBy() {
        return this.orderBy;
    }

    public int getCount() {
        return this.count;
    }

    public LocalDateTime getBeginCreateTime() {
        return this.beginCreateTime;
    }

    public LocalDateTime getEndCreateTime() {
        return this.endCreateTime;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public void setOrderBy(int orderBy) {
        this.orderBy = orderBy;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public void setBeginCreateTime(LocalDateTime beginCreateTime) {
        this.beginCreateTime = beginCreateTime;
    }

    public void setEndCreateTime(LocalDateTime endCreateTime) {
        this.endCreateTime = endCreateTime;
    }

    @Override
    public String toString() {
        return "ArticleQuery{" +
                ", queryKey='" + title + '\'' +
                ", orderBy=" + orderBy +
                ", count=" + count +
                ", beginCreateTime=" + beginCreateTime +
                ", endCreateTime=" + endCreateTime +
                '}';
    }
}
